from manim import *

class LineTip(ArrowTip, Line):
    def __init__(self, length=0.2, **kwargs):
        Line.__init__(self,stroke_width=20,end=0.98*LEFT, **kwargs)
        self.stretch_to_fit_height(length)

class Cube_edges:
    def __init__(self,side_length):
        x = side_length / 2
        self.a, self.b, self.c, self.d = [x, x, x], [-x, x, x], [-x, -x, x], [x, -x, x]
        self.e, self.f, self.g, self.h = [x, x, -x], [-x, x, -x], [-x, -x, -x], [x, -x, -x]
    def get_object(self):
        a=self.a
        b=self.b
        c=self.c
        d=self.d
        e=self.e
        f=self.f
        g=self.g
        h=self.h
        return VGroup(
            Line(a, b), Line(b, c), Line(c, d), Line(d, a),
            Line(e, f), DashedLine(f, g), DashedLine(g, h), Line(h, e),
            DashedLine(c, g), Line(a, e), Line(b, f), Line(d, h)
        )